package com.ling.tts3;

import android.content.Intent;
import android.os.Bundle;
import android.speech.tts.TextToSpeech;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;

import com.ling.tts3.utils.CommonUtils;


public class MainActivity extends AppCompatActivity implements View.OnClickListener{

    private String TAG = "MainActivity";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        EdgeToEdge.enable(this);
        setContentView(R.layout.activity_main);

        Log.i(TAG, "SHA1:"+CommonUtils.getSHA1(this));

        Button tts1 = findViewById(R.id.tts1);
        tts1.setOnClickListener(this);

        Button tts2 = findViewById(R.id.tts2);
        tts2.setOnClickListener(this);

        Button tts3 = findViewById(R.id.tts3);
        tts3.setOnClickListener(this);

    }


    @Override
    public void onClick(View v) {
        if (v.getId() == R.id.tts1) {
            // 跳转到 TTS1Activity
            Intent intent = new Intent(this, TTS1Activity.class);
            startActivity(intent);
        }else if (v.getId() == R.id.tts2) {
            Intent intent = new Intent(this, TTS2Activity.class);
            startActivity(intent);
        }else if (v.getId() == R.id.tts3) {
            Intent intent = new Intent(this, TTS3Activity.class);
            startActivity(intent);
        }
    }
}